all: hogan-3.0.1.js emoji.js countries-rev.js xss.txt
	echo "Built!"

clean:
	rm *.js

hogan-3.0.1.js:
	-rm hogan-3.0.1.js
	wget http://twitter.github.io/hogan.js/builds/3.0.1/hogan-3.0.1.js

xss.txt:
	-rm xss.txt
	wget https://raw.githubusercontent.com/swisskyrepo/PayloadsAllTheThings/master/XSS%20injection/Intruders/xss_alert.txt -O xss.txt

build/emoji.json:
	-rm build/emoji.json
	wget https://raw.githubusercontent.com/omnidan/node-emoji/master/lib/emoji.json -O build/emoji.json

emoji.js: build/emoji.json emoji-extra.json
	nodejs tools/json-to-js.js build/emoji.json emoji-extra.json emoji.js EMOJIS

build/countries.json:
	-rm build/countries.json
	wget http://country.io/names.json -O build/countries.json

countries-rev.js: build/countries.json
	nodejs tools/reverse-json.js build/countries.json countries-rev.js
